package com.shujia.wyh.day08.homework.test1;

public class BaconPizza extends Pizza {
    //培根克数成员变量
    private int gram;

    public BaconPizza() {
    }

    public BaconPizza(String name, int size, int price, int gram) {
        super(name, size, price);
        this.gram = gram;
    }

    public int getGram() {
        return gram;
    }

    public void setGram(int gram) {
        this.gram = gram;
    }

    @Override
    public void show() {
        System.out.println("名称：" + getName());
        System.out.println("价格：" + getPrice()+"元");
        System.out.println("大小：" + getSize()+"寸");
        System.out.println("培根克数：" + gram);
    }
}
